package com.zbkj.service.settlement;

import com.zbkj.dal.entity.user.UserBrokerageRecord;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 佣金记录辅助类
 * @author tianzhonghai
 * 2023/10/6 15:58
 */
public class UserBrokerageRecordBuilder {

    private final UserBrokerageRecord userBrokerageRecord;

    public UserBrokerageRecordBuilder() {
        this.userBrokerageRecord = new UserBrokerageRecord();
        this.userBrokerageRecord.setCreateTime(new Date());
        this.userBrokerageRecord.setUpdateTime(new Date());
    }


    public static UserBrokerageRecordBuilder builder() {
        return new UserBrokerageRecordBuilder();
    }

    public UserBrokerageRecordBuilder uid(Integer uid) {
        userBrokerageRecord.setUid(uid);
        return this;
    }

    public UserBrokerageRecordBuilder subUid(Integer subUid) {
        userBrokerageRecord.setSubUid(subUid);
        return this;
    }

    public UserBrokerageRecordBuilder linkNo(String linkNo) {
        userBrokerageRecord.setLinkNo(linkNo);
        return this;
    }

    public UserBrokerageRecordBuilder linkType(String linkType) {
        userBrokerageRecord.setLinkType(linkType);
        return this;
    }

    public UserBrokerageRecordBuilder type(Integer type) {
        userBrokerageRecord.setType(type);
        return this;
    }

    public UserBrokerageRecordBuilder title(String title) {
        userBrokerageRecord.setTitle(title);
        return this;
    }

    public UserBrokerageRecordBuilder price(BigDecimal price) {
        userBrokerageRecord.setPrice(price);
        return this;
    }

    public UserBrokerageRecordBuilder balance(BigDecimal balance) {
        userBrokerageRecord.setBalance(balance);
        return this;
    }

    public UserBrokerageRecordBuilder mark(String mark) {
        userBrokerageRecord.setMark(mark);
        return this;
    }

    public UserBrokerageRecordBuilder status(Integer status) {
        userBrokerageRecord.setStatus(status);
        return this;
    }

    public UserBrokerageRecordBuilder frozenTime(Integer frozenTime) {
        userBrokerageRecord.setFrozenTime(frozenTime);
        return this;
    }

    public UserBrokerageRecordBuilder thawTime(Long thawTime) {
        userBrokerageRecord.setThawTime(thawTime);
        return this;
    }

    public UserBrokerageRecordBuilder brokerageLevel(Integer brokerageLevel) {
        userBrokerageRecord.setBrokerageLevel(brokerageLevel);
        return this;
    }

    public UserBrokerageRecordBuilder merId(Integer merId) {
        userBrokerageRecord.setMerId(merId);
        return this;
    }

    public UserBrokerageRecord build() {
        return userBrokerageRecord;
    }

}
